// 滑动代码 swipe()
auto();
a=device.width;
b=device.height;

var appName = "快手极速版"
launchApp(appName)

// 向上滑动
function WipeUP(nums,times){
    // nums : 滑动次数
    // times : 每次滑动时长，ms
    for (var i=0; i<nums; i++){
        var time = Math.floor(Math.random() * 10) + 3;
        toast(time)
        toast("剩余次数：" + (nums - i -1))
        swipe(500,1800,500,300,times);
        sleep(time*1000);
        }
}

function KSGuangGao(){
    // 快手广告
    for (var i=0; i<10; i++){
        // 快手极速版看广告
        text("福利").findOne().click();
        sleep("32000");
        back();
        sleep("3000");
        }
}

WipeUP(0,500)